<html xmlns="http://www.w3.org/1999/xhtml"><head><style type="text/css">
dt {
  font-style: italic;
  margin-top: 15px;
  margin-bottom: 3px;
  margin-left: 0px;
  border-bottom: 1px dotted black;
}
dd {
  margin-left: 10px;
}
table {
  border-collapse:collapse;
  border: 1px solid black;
  margin-top: 7px;
}
th {
  border: 1px solid black;
  padding: 3 7 3 7;
}
td {
  border: 1px solid black;
  padding: 3 7 3 7;
}
</style></head><body><p><a name="bastore"></a><b>bastore</b> :
  store in byte/boolean array : <a href="opcodes.html">index</a> : <a href="http://asm.objectweb.org/asm40/javadoc/user/org/objectweb/asm/MethodVisitor.html#visitInsn(int)">visitInsn()</a></p><dl><dt>Description</dt><dd>Takes a 32-bit int from the stack, truncates it to an 8-bit signed byte,
and stores it in an array of bytes. <i xmlns="">arrayref</i> is a reference to an array
of bytes. <i xmlns="">index</i> is an int. <i xmlns="">value</i> is the int value to be stored in
the array. <i xmlns="">arrayref</i>, <i xmlns="">index</i> and <i xmlns="">value</i> are removed from the
stack, and <i xmlns="">value</i> is truncated to 8 bits and stored in the array at the
given <i xmlns="">index</i>.<br></br>bastore is also used to store values in boolean arrays. In this case,
<i xmlns="">arrayref</i> is a reference to an array of booleans (see the
newarray instruction) . If value is zero, false is stored at
the given index in the array, otherwise true is stored at the given
index. In Sun's implementation, boolean arrays are actually stored as byte
arrays, using one byte per boolean value. Other implementations might use
packed arrays - or even int arrays - this is invisible to programs running on
the JVM, which always use baload and bastore to access and store values in
boolean arrays.</dd><dt>Exceptions</dt><dd>NullPointerException - <i xmlns="">arrayref</i> is null<br></br>ArrayIndexOutOfBoundsException - <i xmlns="">index</i> is &lt; 0 or &gt;=
arrayref.length</dd><dt>Notes</dt><dd>2. Array indices start at 0 (the first entry in the array is at
<i xmlns="">index</i> 0).</dd><dt>See also</dt><dd><a href="ref-iastore.html">iastore</a> <a href="ref-.html"></a> <a href="ref-lastore.html">lastore</a> <a href="ref-.html"></a> <a href="ref-fastore.html">fastore</a> <a href="ref-.html"></a> <a href="ref-dastore.html">dastore</a> <a href="ref-.html"></a> <a href="ref-aastore.html">aastore</a> <a href="ref-.html"></a> <a href="ref-castore.html">castore</a> <a href="ref-.html"></a> <a href="ref-sastore.html">sastore</a> <a href="ref-.html"></a> <a href="ref-iaload.html">iaload</a> <a href="ref-.html"></a> <a href="ref-laload.html">laload</a> <a href="ref-.html"></a> <a href="ref-faload.html">faload</a> <a href="ref-.html"></a> <a href="ref-daload.html">daload</a> <a href="ref-.html"></a> <a href="ref-aaload.html">aaload</a> <a href="ref-.html"></a> <a href="ref-baload.html">baload</a> <a href="ref-.html"></a> <a href="ref-caload.html">caload</a> <a href="ref-.html"></a> <a href="ref-saload.html">saload</a> <a href="ref-.html"></a> <a href="ref-newarray.html">newarray</a> <a href="ref-.html"></a> </dd><dt>Stack</dt><dd><table xmlns="">
<tr>
<td>
<b>Before </b>
</td>
<td><b>After</b></td></tr>
<tr>
<td>value</td>
<td>...</td></tr>
<tr>
<td>index</td>
<td>...</td></tr>
<tr>
<td>arrayref</td>
<td>...</td></tr>
<tr>
<td>...</td>
<td>...</td></tr>
</table></dd><dt>Bytecode</dt><dd><table xmlns="">
<tr>
<td>
<b> Type </b>
</td>
<td><b>Description</b></td></tr>
<tr>
<td>
u1 
</td>
<td>bastore
opcode = 0x54 (84)
</td></tr>
</table></dd></dl></body></html>